package com.vcc.service.service;

import com.mybatisflex.core.service.IService;
import com.vcc.data.entity.ClientParam;
import com.vcc.service.boss.request.clientParam.BossClientParamUpdateRequest;
import com.vcc.service.boss.response.clientParam.ClientParamVoBoss;

import java.util.List;
import java.util.Map;

public interface ClientParamService extends IService<ClientParam> {

    List<ClientParamVoBoss> list(String code, String name, Boolean hasUserConfig);

    Boolean existsByCode(String code);

    Boolean updateClientParam(BossClientParamUpdateRequest bossClientParamUpdateRequest);

    ClientParam getByCode(String code);

    String getValueByCodeAndUserId(String code, Long userId);

    String getValueByCodeAndUserIdOrDefaultValue(String code, Long userId,String defaultValue);

    Map<Long,String> getValueByCodeAndUserIdsOrDefaultValue(String code, List<Long> userId, String defaultValue);

    Integer sumByUserIdAndRole(Long userId, String role);
}
